package com.nuanshui.heatedloan.userinfo.service;

import com.nuanshui.framework.consts.TransactionManagerType;
import com.nuanshui.heatedloan.constant.ServiceConstant;
import com.nuanshui.heatedloan.userinfo.dal.mapper.UserRecommendMapper;
import com.nuanshui.heatedloan.userinfo.facade.UserRecommendService;
import com.nuanshui.heatedloan.userinfo.model.UserInfo;
import com.nuanshui.heatedloan.userinfo.vo.UserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by zxh on 2017/2/10.
 */
@Service(ServiceConstant.UserRecommendService)
@Transactional(readOnly=true,value= TransactionManagerType.USER_INFO_TRANSACTION_MANAGER)
public class UserRecommendServiceImpl implements UserRecommendService {

    @Autowired
    private UserRecommendMapper userRecommendMapper;

    @Override
    public List<UserVo> loadRecommendUsers() {
        return userRecommendMapper.loadRecommendUsers();
    }

    @Override
    public List<UserInfo> loadRecommendUser() {
        return userRecommendMapper.loadRecommendUser();
    }

    @Override
    public List<UserVo> loadRandRecommendUsers()
    {
        return userRecommendMapper.loadRandRecommendUsers();
    }
}
